import com.demo1.model.User;
import com.demo1.service.UserService;
import com.demo2.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        System.out.println("正在获取Bean对象...");
//        UserController userController =
//                context.getBean("userController", UserController.class);
//        userController.start();
        UserController userController =
                context.getBean("userController", UserController.class);

    }
}
